import Vue from 'vue';
import Router from 'vue-router';

Vue.use(Router);

export const constantRouterMap = [
  { path: '/',
    meta: { title: '登录', noCache: true },
    component: (resolve) => require(['@/views/onload'], resolve),
    hidden: true
  },
  {
    path: '/404',
    component: (resolve) => require(['@/views/features/404'], resolve),
    hidden: true
  },
  {
    path: '/401',
    component: (resolve) => require(['@/views/features/401'], resolve),
    hidden: true
  }
];

export default new Router({
  mode: 'hash', // mode: 'history'
  scrollBehavior: () => ({ y: 0 }),
  routes: constantRouterMap
});
